export default {
  many_to_one_user: {
    type: "object",
    properties: {
      id: {
        type: "integer",
        description: "用户ID",
        example: 1,
      },
      name: {
        type: "string",
        description: "用户名",
        example: "张三",
      },
      photos: {
        type: "array",
        description: "用户关联的照片列表",
        items: {
          $ref: "#/components/schemas/many_to_one_photo",
        },
      },
    },
    required: ["name"],
  },
  many_to_one_photo: {
    type: "object",
    properties: {
      id: {
        type: "integer",
        description: "照片ID",
        example: 1,
      },
      url: {
        type: "string",
        description: "照片URL",
        example: "https://example.com/photo.jpg",
      },
    },
    required: ["url"],
  },
};
